import AntdCrud from "crud/components";
import { actions } from "./Actions";
import { columns } from "./Columns";
import { Account } from "./type";

const data: Account[] = [
  {
    key: "1",
    name: "John Brown",
    age: 32,
    address: "New York No. 1 Lake Park",
    tags: ["nice", "developer"],
  },
  {
    key: "2",
    name: "Jim Green",
    age: 42,
    address: "London No. 1 Lake Park",
    tags: ["loser"],
  },
  {
    key: "3",
    name: "Joe Black",
    age: 32,
    address: "Sydney No. 1 Lake Park",
    tags: ["cool", "teacher"],
  },
];

const crudDemo = () => {
  return (
    <div>
      <AntdCrud
        columns={columns}
        dataSource={data}
        actions={actions}
        pageNumber={1}
        pageSize={10}
        totalRow={100}
      />
    </div>
  );
};

export default crudDemo;
